home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
rmtlog1a
/
modlogma.bas
< prev
next >
Wrap
BASIC Source File
|
1999-03-20
|
3KB
|
64 lines
Attribute VB_Name = "modLogMain"
Option Explicit
Public Declare Function GetComputerName Lib "kernel32" Alias _
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) _
As Long
Public Declare Function GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) _
As Long
Public Declare Function RegisterEventSource Lib "advapi32.dll" Alias _
"RegisterEventSourceA" (ByVal lpUNCServerName As String, _
ByVal lpSourceName As String) As Long
Public Declare Function DeregisterEventSource Lib "advapi32.dll" ( _
ByVal hEventLog As Long) As Long
' Original Declare from email
Public Declare Function ReportEvent Lib "advapi32.dll" Alias _
"ReportEventA" (ByVal hEventLog As Long, ByVal wType As Integer, _
ByVal wCategory As Integer, ByVal dwEventID As Long, _
ByVal lpUserSid As Any, ByVal wNumStrings As Integer, _
ByVal dwDataSize As Long, plpStrings As Long, _
lpRawData As Any) As Boolean
' Declare from VB API loader
'Public Declare Function ReportEvent Lib "advapi32.dll" Alias _
' "ReportEventA" (ByVal hEventLog As Long, ByVal wType As Long, _
' ByVal wCategory As Long, ByVal dwEventID As Long, _
' lpUserSid As Any, ByVal wNumStrings As Long, _
' ByVal dwDataSize As Long, ByVal lpStrings As Long, _
' lpRawData As Any) As Long
' Declare from Appleman
'Public Declare Function ReportEvent& Lib "advapi32.dll" Alias _
' "ReportEventA" (ByVal hEventLog As Long, _
' ByVal wType As Long, ByVal wCategory As Long, _
' ByVal dwEventID As Long, lpUserSid As Any, _
' ByVal wNumStrings As Long, ByVal dwDataSize As Long, _
' ByVal lpStrings As Long, lpRawData As Any)
Public Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" ( _
hpvDest As Any, hpvSource As Any, _
ByVal cbCopy As Long)
Public Declare Function GlobalAlloc Lib "kernel32" ( _
ByVal wFlags As Long, _
ByVal dwBytes As Long) As Long
Public Declare Function GlobalFree Lib "kernel32" ( _
ByVal hMem As Long) As Long
'-- Public Log Event Types
Public Const EVENTLOG_SUCCESS = 0
Public Const EVENTLOG_ERROR_TYPE = 1
Public Const EVENTLOG_WARNING_TYPE = 2
Public Const EVENTLOG_INFORMATION_TYPE = 4
Public Const EVENTLOG_AUDIT_SUCCESS = 8
Public Const EVENTLOG_AUDIT_FAILURE = 10
' Private Constants
Public Const GMEM_ZEROINIT = &H40